Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build break because of missing metdata #8364

Merged
merged 3 commits into from
Jan 20, 2022
Merged

Conversation

ViktorHofer
Copy link
Member

In the previous change I didn't notice that the binplacing logic depends on metadata passing in being preserved in the items being returned. Because of that, I revert the collection change from List to HashSet and instead manually iterate through the list. The binplacing logic depends on duplicates being allowed versus the inner build project logic explicitly doesn't want duplicates to avoid unnecessary inner builds, hence adding a switch for it.

Tested this in dotnet/runtime for real this time. I didn't notice the break before as I tested a part of the libs subset in dotnet/runtime which wasn't affected.

In the previous change I didn't notice that the binplacing logic depends on metadata passing in being preserved in the items being returned. Because of that, I revert the collection change from List to HashSet and instead manually iterate through the list. The binplacing logic depends on duplicates being allowed versus the inner build project logic explicitly doesn't want duplicates to avoid unnecessary inner builds, hence adding a switch for it.
@ViktorHofer ViktorHofer requested a review from safern January 20, 2022 01:28
@ViktorHofer ViktorHofer self-assigned this Jan 20, 2022

[Required]
public string RuntimeGraph { get; set; }

[Required]
public string[] SupportedTargetFrameworks { get; set; }

// Returns distinct items only. Compares the include values. Metadata is ignored.
public bool Distinct { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to turn this off or on and why can't the behavior just be that we always return a Distinct value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Details are in the top comment. The binplacing logic which also uses this task requires non distinct values where-as the DispatchToInnerBuild logic which is responsible for filtering out non applicable inner builds requires distinct values.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, makes sense.

@ViktorHofer ViktorHofer merged commit 1c78e43 into main Jan 20, 2022
@ViktorHofer ViktorHofer deleted the ViktorHofer-patch-3 branch January 20, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants